<%--
  @desc: 快撤理赔管理首页
  @author: xujin
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);"
            action="<c:url value='/accident/list'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left; line-height: 25px;">
                    <label>事故编号：</label> <input name="accidentId" type="text" value="${query.accidentId}" placeholder="请输入事故编号"
                        style="width: 150px; font-family: '微软雅黑 sans-serif serif';"/>
                </li>
                <li style="float: left; line-height: 25px;">
                    <label>事故时间：</label>
                    <input name="start" type="text"
                            class="date" datefmt="yyyy-MM-dd HH:mm:ss"
                            value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                            placeholder="起始时间"
                            style="width: 100px; font-family: '微软雅黑 sans-serif serif';"/> - <input
                        name="end" type="text" class="date" datefmt="yyyy-MM-dd HH:mm:ss"
                        value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                        placeholder="结束时间"
                        style="width: 100px; font-family: '微软雅黑 sans-serif serif';"/></li>
                <li style="float: left; line-height: 25px;">
                    <label>处理方式：</label> <select name="handler">
                    <option value="" selected="selected">全部</option>
                    <option value="1"
                            <c:if test="${query.handler==1}">selected="selected"</c:if>>双方自行协商责任
                    </option>
                    <option value="2"
                            <c:if test="${query.handler==2}">selected="selected"</c:if>>远程定责
                    </option>
                    <option value="3"
                            <c:if test="${query.handler==3}">selected="selected"</c:if>>事故理赔中心处理
                    </option>
                </select></li>
                <li style="float: left; line-height: 25px;">
                    <label>关键字：</label> <input name="keywords"
                        type="text" value="${query.keywords}"
                        placeholder="请输入车牌号、联系电话、事故发生地点检索"
                        style="width: 230px; font-family: '微软雅黑 sans-serif serif';"/></li>
                <li style="float: left; line-height: 25px;">
                    <label>单据状态：</label> <select name="djstatus">
                    <option value="" selected="selected">全部</option>
                    <option value="1"
                            <c:if test="${query.djstatus==1}">selected="selected"</c:if>>状态挂起
                    </option>
                    <option value="2"
                            <c:if test="${query.djstatus==2}">selected="selected"</c:if>>完成
                    </option>
                    <option value="3"
                            <c:if test="${query.djstatus==3}">selected="selected"</c:if>>已过期
                    </option>
                </select></li>
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <table class="table" width="100%" layoutH="115">
        <thead>
        <tr>
            <th width="80">事故编号</th>
            <th width="80">事故发生时间</th>
            <th width="150">事故发生地点</th>
            <th width="150">处理方式</th>
            <th width="80">单据状态</th>
            <th width="80">详细查看</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="accmain" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" rel="${accmain.accidentId}">

                <td>${accmain.accidentId}</td>
                <td><fmt:formatDate value="${accmain.occurTime}"
                        pattern="yyyy-MM-dd HH:mm"/></td>
                <td>${accmain.position}</td>
                <td><c:if test="${accmain.handler ==1}">双方自行协商责任</c:if>
                    <c:if test="${accmain.handler ==2}">远程定责</c:if>
                    <c:if test="${accmain.handler ==3}">事故理赔中心处理</c:if>
                </td>
                <td><c:if test="${accmain.status ==1}">状态挂起</c:if>
                    <c:if test="${accmain.status ==2}">完成</c:if>
                    <c:if test="${accmain.status ==3}">已过期</c:if>
                </td>
                <td><a
                        href="<c:url value='/accident/detail/${accmain.accidentId}'/>"
                        target="dialog" rel="page_role_res_bind" width="800" height="400"
                        mask="true" resizable="false" maxable="false" title="事故详情查看">查看详情</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span> <select id="cob_ps" class="combox"
                name="numPerPage"
                onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select> <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab"
                totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
                pageNumShown="10" currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post"
            action="<c:url value='/accident/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/> 
        <input type="hidden" name="handler" value="${query.handler}"/> 
        <input type="hidden" name="keywords" value="${query.keywords}"/> 
        <input type="hidden" name="djstatus" value="${query.djstatus}"/> 
        <input type="hidden" name="start"
            value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="end"
                value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="orderField" value="${query.orderField}"/>
        <input type="hidden" name="orderDirection"
                value="${query.orderDirection}"/>
    </form>
</div>
